import { requestClient, buildGetUrl } from '#/api/request';
/**
 * 获取列表
 */
export async function queryJobList(params) {
  return requestClient.get<string[]>(buildGetUrl('/job/manage/list', params));
}

export async function queryJobLog(params) {
  return requestClient.get<string[]>(buildGetUrl('/job/log', params));
}

export async function insertJob(data) {
  return requestClient.post<any>('/job', data);
}

export async function deleteJob(id: string) {
  return requestClient.delete<any>(`/job?id=${id}`);
}

export async function updateJob(data) {
  return requestClient.put<any>('/job', data);
}

export async function updateJobStatus(data) {
  return requestClient.put<any>('/job/status', data);
}
export async function queryJobCount() {
  return requestClient.get<string[]>('/job/count');
}
